/*
 * Copyright (c) 2023 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef INPUTMETHOD_IMF_PANEL_INFO_H
#define INPUTMETHOD_IMF_PANEL_INFO_H

namespace OHOS {
namespace MiscServices {
enum PanelType {
    SOFT_KEYBOARD = 0,
    STATUS_BAR,
};

enum PanelFlag {
    FLG_FIXED = 0,
    FLG_FLOATING,
    FLG_CANDIDATE_COLUMN,
};

struct PanelInfo {
    PanelType panelType = SOFT_KEYBOARD;
    PanelFlag panelFlag = FLG_FIXED;
};

enum class ImmersiveMode : int32_t {
    NONE_IMMERSIVE = 0,
    IMMERSIVE = 1,
    LIGHT_IMMERSIVE = 2,
    DARK_IMMERSIVE = 3,
    END,
};

enum Trigger : int32_t {
    IME_APP,
    IMF,
    END
};

struct PanelStatusInfo {
  PanelInfo panelInfo;
  bool visible{false};
  Trigger trigger{END};
  bool operator==(const PanelStatusInfo& info) const {
    return info.panelInfo.panelFlag == panelInfo.panelFlag &&
           info.panelInfo.panelType == panelInfo.panelType &&
           info.visible == visible && info.trigger == trigger;
  }
};
} // namespace MiscServices
} // namespace OHOS

#endif // INPUTMETHOD_IMF_PANEL_INFO_H